package com.google.code.sip.ucenter.quartz;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.code.sip.ucenter.service.MongoManager;

public class CheckAllEntitiesJob {

	private static final Logger logger = LoggerFactory
			.getLogger(CheckAllEntitiesJob.class);
	private MongoManager mongoManager;

	public void execute() {
		logger.info("Start to check mongodb data job.");

		List<String> errors = mongoManager.validate();
		for (String error : errors) {
			logger.error("无效数据:" + error);
		}
		logger.info("Check mongodb data job is done.");
	}

	/**
	 * @param mongoManager
	 *            the mongoManager to set
	 */
	public void setMongoManager(MongoManager mongoManager) {
		this.mongoManager = mongoManager;
	}

}
